//
//  DerailIntroduceCell.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/9/1.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "DerailIntroduceCell.h"

@implementation DerailIntroduceCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setSubviews];
    }
    return self;
}

-(void)setSubviews{
    self.pictureView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.pictureView];
    [self.pictureView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).offset(scaleLeftAndRight(5));
        make.right.equalTo(self.contentView.mas_right).offset(scaleLeftAndRight(-5));
        make.top.equalTo(self.contentView.mas_top).offset(scaleLeftAndRight(5));
        make.height.mas_equalTo(scaleTopAndBottom(180));
    }];
    self.descrpLabel = [[UILabel alloc] init];
    self.descrpLabel.numberOfLines = 0;
    [self.contentView addSubview:self.descrpLabel];
    [self.descrpLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView.mas_left).offset(scaleLeftAndRight(5));
        make.right.equalTo(self.contentView.mas_right).offset(scaleLeftAndRight(-5));
        make.top.equalTo(self.pictureView.mas_bottom).offset(scaleLeftAndRight(5));
        make.bottom.equalTo(self.contentView.mas_bottom).offset(scaleTopAndBottom(5));
    }];
    self.pictureView.backgroundColor = [UIColor cyanColor];
    self.descrpLabel.backgroundColor = [UIColor redColor];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
